Systems and methods herein generally relate to processing electronic images, and more specifically to working with electronic images that are in the multiple raster content (MRC) format.
In addition to offering different resolutions, different compression schemes are offered to reduce the file size of color images. One of the popular compression/file formats currently being offered is Mixed or Multiple Raster Content (MRC) representation. The MRC representation provides as a way to achieve high image quality with small file size. The MRC representation of documents is versatile and provides the ability to represent color images as either color or monochrome text.
An image may generally include different types of features, for example, black text on a white background, dark color text on a light color background, light color text on dark color background, etc. The MRC representation enables the use of multiple “planes” or layers for the purpose of representing such documents. For example, a foreground plane may contain only the information of the color of the text, a binary selector or mask plane contains the pixels of the text, and a background plane may contain only the information relating to the background color.
Thus, the selector or mask layer contains high spatial frequency information for regions otherwise having slowly changing color information. In effect, regions whose color changes relatively slowly, if at all, are placed onto the foreground layer. When the image represented by the data structure is to be rendered or otherwise generated, the color information stored in the foreground plane has spatial or shape attributes applied to it based on the binary information stored in the mask plane and the resulting shaped color information is combined onto the background plane to form the reconstructed plane.
In one example, an N-layer MRC process may utilize a single background plane with multiple foreground planes. The N-layer MRC process separates the foreground layer into various independent sublayers based on color and spatial proximity of the pixels. Each of the foreground sublayers is generally binarized having a specific color. In the N-layer MRC process, more than one foreground sublayer may have the same color (e.g., different masks include colored data). Thus, each of the layers has a respective portion of the information to be graphically displayed in the document. In this manner, colored masks are overlaid on each other to generate the MRC image of the document.